home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form main
- BackColor = &H00C0C0C0&
- Caption = "StrField"
- ClientHeight = 3360
- ClientLeft = 4590
- ClientTop = 1800
- ClientWidth = 4530
- Height = 3855
- Left = 4485
- LinkTopic = "Form1"
- ScaleHeight = 3360
- ScaleWidth = 4530
- Top = 1410
- Width = 4740
- Begin TextBox Text3
- Height = 285
- Left = 180
- TabIndex = 6
- Text = "10"
- Top = 2220
- Width = 4215
- End
- Begin TextBox Text2
- Height = 285
- Left = 180
- TabIndex = 4
- Text = ","
- Top = 1560
- Width = 4215
- End
- Begin TextBox Text1
- Height = 855
- Left = 180
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 1
- Text = "abc,def,ghi,jkl,mno,pqr,stu,vwx,yz,123,456,789,012,345,678,901,234,567,890"
- Top = 360
- Width = 4215
- End
- Begin CommandButton Command1
- Caption = "StrField"
- Height = 435
- Left = 1620
- TabIndex = 0
- Top = 2700
- Width = 1335
- End
- Begin Label Label3
- BackStyle = 0 'Transparent
- Caption = "Field number:"
- Height = 255
- Left = 180
- TabIndex = 5
- Top = 1980
- Width = 4215
- End
- Begin Label Label2
- BackColor = &H00FFFFFF&
- BackStyle = 0 'Transparent
- Caption = "Separator:"
- Height = 255
- Left = 180
- TabIndex = 3
- Top = 1320
- Width = 4215
- End
- Begin Label Label1
- BackColor = &H00FFFFFF&
- BackStyle = 0 'Transparent
- Caption = "Record:"
- Height = 255
- Left = 180
- TabIndex = 2
- Top = 120
- Width = 4215
- End
- Sub Command1_Click ()
- cr$ = Chr$(13)
- record$ = text1.Text
- separator$ = text2.Text
- fieldnumber% = Val(text3.Text)
- field$ = strfield(record$, separator$, fieldnumber%)
- If field$ = "" Then
- field$ = "Nuthin', 'cause it probably didn't exist."
- End If
- stuff$ = "Field number:" + cr$ + cr$ + text3.Text + cr$ + cr$ + " of the record:" + cr$ + cr$ + text1.Text + cr$ + cr$ + "is:" + cr$ + cr$ + field$
- MsgBox stuff$
- End Sub
-